package com.uiao.stone.common.exception;

import org.springframework.stereotype.Service;

/**
 * @author uiao
 * @Title: 自定义异常使用
 * @date 2018/8/615:58
 */
@Service
public class ExceptionDemoServiceImpl {

    public void payTest() throws PayException {
        if (true) {
            throw new PayException("支付金额和订单金额不相符，请核对金额");
        }
    }

    public void billTest() throws PayException, BillException {
        if (true) {
            throw new BillException("账单异常");
        }
        if (true) {
            throw new PayException();
        }
    }
}
